package com.gs.wzweather.dao;

import com.gs.wzweather.dao.mapper.PortMapper;
import com.gs.wzweather.entity.Port;
import com.gs.wzweather.entity.Site;
import com.gs.wzweather.utils.Constant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class PortDao {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    PortMapper mapper;

    public List<Port> queryAllPort() {
        try {
            List<Port> ports = mapper.queryAllPort();
            return ports;
        } catch (Exception e) {
            logger.info("queryAllPort->{}", e.getMessage());
            return null;
        }
    }
}
